#pragma once

// include the basic windows header files and the Direct3D header file
#include "Global.h"
#include "Sprite.h"
#include "DirectInput.h"
#include "WorldController.h"




class DXGraphics 
{
private:
	// global declarations
	LPDIRECT3D9 d3d;    // the pointer to our Direct3D interface
	LPDIRECT3DDEVICE9 d3ddev;    // the pointer to the device class
	LPD3DXSPRITE d3dspt;    // the pointer to our Direct3D Sprite interface
	LPD3DXFONT d3dfnt ;	//the pointer to the Direct3D Font Interface

	// sprite declarations
	LPDIRECT3DTEXTURE9 sprites[3];
	HWND a_hWnd ;

	// matrix declarations
	D3DXMATRIX spriteScaling ;
	D3DXMATRIX spriteRotation ;
	D3DXMATRIX spriteTranslation ;
	D3DXMATRIX matTransform ;
	POINT mousePos ; //holds the position of the mouse within the game client window

	float theta ;
	float numFrames ;
	float timeElapsed ;
	float timePerUpdate ;
	int numNormal ;
	int numInfected ;
	int InfectionRate ;
	int CureRate ;
	char controlText[100] ;
	char population[100] ;
	char rules[100] ;
	bool mouseButtonDown ;
	bool resetButtonDown ;
	bool speedButtonDown ;
	bool cureButtonDown ;
	bool infectButtonDown ;

	Sprite sp[400] ;
	WorldController world ;

	// vector declarations
	D3DXVECTOR3 center ;
	D3DXVECTOR3 position ;
public:
	DXGraphics( ) ;
	~DXGraphics( ) ;
	// function prototypes
	void initD3D(HWND hWnd) ;    // sets up and initializes Direct3D
	void Update( float dt ) ;
	void render_frame( ) ;    // renders a single frame
	void cleanD3D(void) ;    // closes Direct3D and releases memory
} ;